package com.youan.serve.controller.swagger;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youan.pangu.base.bean.validate.UpdateValidateGroup;
import com.youan.serve.dao.domain.Syscode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
* <p>
    *  swagger接口描述文件
    * </p>
*
* @author auto_code
* @since 2020-02-29
*/
@Validated
@Api(tags = "Syscode管理接口")
public interface SyscodeControllerSwagger {

    @ApiOperation(value = "新增一个Syscode实例")
    Syscode addSyscode(@Validated Syscode syscode) throws Exception;

    @ApiOperation(value = "修改一个Syscode实例")
    Syscode updateSyscode(@Validated(UpdateValidateGroup.class) Syscode syscode);

    @ApiOperation(value = "获取所有Syscode实例")
    List<Syscode> selectAllSyscode();

    @ApiOperation(value = "根据主键删除一个Syscode实例")
    void deleteSyscodeByCodeId(@NotBlank String codeId);

    @ApiOperation(value = "根据主键获取Syscode实例")
    Syscode selectSyscodeByCodeId(@NotBlank String codeId);

    @ApiOperation(value = "根据syscodeId删除syscode及syscodeDetial")
    void deleteSysCodeAndSysCodeDetailsBySysCodeId(@NotBlank String sysCodeId);

    @ApiOperation(value = "分页获取syscode实体")
    Page<Syscode> getSyscodePageable(Page page);

    @ApiOperation(value = "根据example查询")
    List<Syscode> selectSyscodesByExample(Syscode syscode);
}

